home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
126-150
/
scopedisk146
/
liner
/
rexx
/
countlinesandwords.rx
next >
Wrap
Text File
|
1995-03-19
|
752b
|
29 lines
/*Counts the total number of lines and words in the current outline*/
address 'liner'
options results
'totop' /*Go to the top*/
'getlinetext' /*Get the first line of text*/
oldresult = "fwh8i3oihfi"
TotalWords = 0
TotalLines = 0
do until result = oldresult /*Do until the current line and the previous*/
/*match (i.e. cursor couldn't go down; hmmm*/
/*future plan: have cursordown (& up) */
/*return a result*/
TotalLines = TotalLines + 1
TotalWords = TotalWords + words(result)
oldresult = result
'cursordown'
'getlinetext'
end
echo "There were " || TotalLines || " lines."
echo "There were " || TotalWords || " words."